package com.le.tester.javaThink.fifth.chapter12_Collections;

/**
 * createTime：2021/8/30 11:20
 * description：StackTest2
 */
public class StackTest2 {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<>();
        for (String s : "My dog has fleas".split(" "))
            stack.push(s);
        while (!stack.isEmpty()) {
            System.out.print(stack.pop() + " ");
        }
    }
}
